<?php /*a:3:{s:71:"D:\phpStudy\WWW\tp5\application\index\view\tool_app\tool_small_app.html";i:1550065495;s:60:"D:\phpStudy\WWW\tp5\application\index\view\index\header.html";i:1550326364;s:60:"D:\phpStudy\WWW\tp5\application\index\view\index\footer.html";i:1550326435;}*/ ?>
 <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>广州商学院lms</title>
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" src="/static/lib/layui/layui.js"></script>
    <script type="text/javascript" src="/static/js/jquery.js"></script>
    <link rel="stylesheet" type="text/css" href="/static/lib/layui/css/layui.css" />
    <style>
        body{
            background: #F7F7F7;
        }
       
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">广州商学院-lms</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="<?php echo url('index'); ?>">首页</a></li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <?php if(app('session')->get('user')): ?>
                <a href="javascript:;">
                    <?php if(app('session')->get('user.img')): ?>
                    <img src="/uploads/<?php echo htmlentities(app('session')->get('user.img')); ?>" class="layui-nav-img">
                    <?php else: ?>
                    <img src="/static/img/头像默认.png" class="layui-nav-img">
                    <?php endif; ?>
                    <?php echo htmlentities(app('session')->get('user')->userinfo->realname); ?>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">切换账号</a></dd>
                </dl>
                <?php else: ?>
                <a href="<?php echo url('login'); ?>">登录</a>
                <?php endif; ?>
            </li>
            <li class="layui-nav-item">
                <?php if(app('session')->get('user')): ?>
                <a href="<?php echo url('logout'); ?>">注销</a>
                <?php else: ?>
                <a href="<?php echo url('regist'); ?>">注册</a>
                <?php endif; ?>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li id="lab_app" class="layui-nav-item">
                    <a class=""  href="javascript:;">实验室预约</a>
                    <dl class="layui-nav-child">
                        <dd><a href="<?php echo url('lab_empty'); ?>">空实验室</a></dd>
                        <!--<dd><a href="javascript:;">列表二</a></dd>-->
                    </dl>
                </li>
                <li id="tool_app" class="layui-nav-item">
                    <a href="javascript:;">器具租借</a>
                    <dl class="layui-nav-child">
                        <dd><a href="<?php echo url('tool_small_app'); ?>">小型器具借用申请</a></dd>
                        <dd><a href="<?php echo url('tool_big_app'); ?>">大型器具借用申请</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item" id="lab_yuyue">
                    <a href="javascript:;">预约进度</a>
                    <dl class="layui-nav-child">
                        <dd id="now_yuyue"><a href="<?php echo url('lab_app_list'); ?>">课室当前预约</a></dd>
                        <dd id="old_yuyue"><a href="<?php echo url('lab_history_list'); ?>">课室历史预约</a></dd>
                        <dd id="tool_yuyue"><a href="<?php echo url('tool_list'); ?>">器具借用进度</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item" id="teacher_list"><a href="<?php echo url('teacher_list'); ?>">联系教师</a></li>
                <li class="layui-nav-item" id="notice"><a href="<?php echo url('notice'); ?>">公告消息</a></li>
                <li class="layui-nav-item" id="feedback"><a href="<?php echo url('feedback'); ?>">问题反馈</a></li>
                <li class="layui-nav-item" id="about_me"><a href="<?php echo url('about_me'); ?>">关于我的</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body">

<div style="padding:20px; ">
    <div style="background: #FFFFFF;padding: 20px 50px;">
        <div style="margin: 10px 0px;">
        <span class="layui-breadcrumb">
  <a href="">首页</a>
  <a href="">器具租借</a>
  <a><cite>小型器具借用申请</cite></a>
</span>
        </div>
            <div class="layui-row">
            </div>
                <form class="layui-form " method="get" action="">
                    <div class="layui-form-item">
                        <div class="layui-input-inline">
                            <input type="text" id="test2" name="date"  placeholder="器具名称"  class="layui-input" >
                        </div>
                        <button class="layui-btn" type="submit"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
                    </div>

                </form>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>器具名称</th>
                    <th>所属课室</th>
                    <th>可借最大天数</th>
                    <th>管理教师</th>
                    <th>操作</th>
                </thead>
                <tbody>
                <?php if(is_array($tools) || $tools instanceof \think\Collection || $tools instanceof \think\Paginator): $i = 0; $__LIST__ = $tools;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tool): $mod = ($i % 2 );++$i;?>
                <tr>
                    <td><?php echo htmlentities($tool['id']); ?></td>
                    <td><?php echo htmlentities($tool['name']); ?></td>
                    <td><?php echo htmlentities($tool->lab->name); ?></td>
                    <td><?php echo htmlentities($tool['num']); ?>天</td>
                    <td>
                        <?php echo htmlentities($tool->lab->teacher->realname); ?>
                    </td>
                    <td>
                        <a title="申请预约" onclick="tool_app(this,'<?php echo htmlentities($tool['id']); ?>')" href="javascript:;">
                            <!--<i class="layui-icon">&#xe640;</i>-->
                            申请借
                        </a>
                    </td>
                </tr>
                <?php endforeach; endif; else: echo "" ;endif; ?>
                </tbody>
            </table>
       
        <div class="page">
           
        </div>
       
    </div>
</div>

<div class="layui-footer">
    <!-- 底部固定区域 -->
    Copyright-2018-实验室管理系统网
</div>
</div>
<script>
    //JavaScript代码区域
    layui.use('element', function() {
        var element = layui.element;

    });
</script>
</body>
</html>

<script>
    $('#tool_app').addClass("layui-nav-itemed");
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#test2' //指定元素
        });
    });
    layui.use('form', function(){
        var form = layui.form;
        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
    function tool_app(obj,id) {
        layer.open({
            title:'借出申请',
            type: 2,
            area: ['600px', '410px'],
            shadeClose: true, //点击遮罩关闭
            content: "<?php echo url('tool_app/tool_choose'); ?>/id/"+id,
        })
    }
</script>

